package com.yjt.gcss.gddw.common.dao;

import java.util.ArrayList;
import java.util.Collection;

import org.hibernate.criterion.MatchMode;
import org.hibernate.criterion.Order;
import org.springframework.stereotype.Service;

import com.yjt.common.easyui.datagrid.DataGridDAOImpl;
import com.yjt.common.hibernate.base.DaoException;
import com.yjt.gcss.gddw.common.bean.domain.InfoSxxy;
import com.yjt.gcss.gddw.common.bean.domain.InfoSxxyId;

@Service(InfoSxxyDao.BEAN_PACKAGE_NAME)
public class InfoSxxyDao extends DataGridDAOImpl {

	public static final String BEAN_PACKAGE_NAME = "com.yjt.gcss.gddw.common.dao.InfoSxxyDao";

	public InfoSxxyDao(){

	}

	public InfoSxxy getBeanById(InfoSxxyId id) throws DaoException {
		return (InfoSxxy) getBeanById(BEAN_PACKAGE_NAME, id, false);
	}
	
	public InfoSxxy getBeanByIdForUpdate(InfoSxxyId id) throws DaoException {
		return (InfoSxxy) getBeanById(BEAN_PACKAGE_NAME, id, true);
	}

	@SuppressWarnings("rawtypes")
	public Collection getAll() throws DaoException {
		return getAll(BEAN_PACKAGE_NAME);
	}

	@SuppressWarnings("rawtypes")
	public InfoSxxy getBeanByParams(String hqlName,ArrayList paraList) throws DaoException{
		return (InfoSxxy) getProtoBeanByParams(hqlName,paraList);
	}

	public InfoSxxy getBeanByBean(InfoSxxy bean, MatchMode mode) throws DaoException{
		return (InfoSxxy) getProtoBeanByBean(bean, mode);
	}
	
	public InfoSxxyDao setOrder(Order order){
		return (InfoSxxyDao)super.addOrder(order);
	}
}
